import { request } from './request'

/*
 * 获取最新MV
 */
export const _getFirst = (area, limit) =>
  request({
    url: '/mv/first',
    params: {
      area,
      limit
    }
  })

/*
 * 获取排行MV
 */
export const _getTopMv = (area, limit) =>
  request({
    url: '/top/mv',
    params: {
      area,
      limit
    }
  })

/*
 * 获取推荐MV
 */
export const _Personalized = () =>
  request({
    url: '/personalized/mv'
  })

/*
 * 获取MV数据
 */
export const _getMvDetail = (mvid) =>
  request({
    url: '/mv/detail',
    params: { mvid }
  })

/*
 * 获取MV地址 r: 分辨率,默认 1080,可从 /mv/detail 接口获取分辨率列表
 */
export const _getMvUrl = (id, r) =>
  request({
    url: '/mv/url',
    params: { id, r }
  })

/*
 * 获取相似MV
 */
export const _getMvSimi = (mvid) =>
  request({
    url: '/simi/mv',
    params: { mvid }
  })

/*
 * 获取MV评论
 */
export const _getCommentMv = (id, limit, offset) =>
  request({
    url: '/comment/mv',
    params: {
      id,
      limit,
      offset
    }
  })

/*
 * 获取全部MV
 */
export const _getAllMv = (area, type, order, limit, offset) =>
  request({
    url: '/mv/all',
    params: {
      area,
      type,
      order,
      limit,
      offset
    }
  })
